use rocket::{http::Status, response::status::Custom};
use serde_json::{json, Value};

pub fn server_error(err: &dyn std::error::Error) -> Custom<Value> {
  log::error!("{err}");
  Custom(Status::InternalServerError, json!("Error."))
}
